Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-405

Recursive functions corrupt evaluation frame if reassigned

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3
    • 3.4.0
    • None

    Description

      This issue stems from the special handling recursive functions. A recursive function is detected when a lambda is created and assigned to a variable and that variable is captured by the lambda. During the assignment, the lambda frame - the captured value for the lambda symbol in that frame - is updated with a reference to the lambda itself. This can only occur after the lambda is created (obviously).
      The code that handles the special case during assignment does not verify that the caller is indeed its creator frame. Thus, if the lambda is assigned to a different variable later on in a different scope, that same code will trash the frame with a reference to the lambda...

      Attachments

        Activity

          People

            henrib Henri Biestro
            henrib Henri Biestro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: